<template>
  <div class="content">
    <div class="simulationAlert" v-if="isShow">
      <div class="title">提示</div>
      <div class="text">确定清空浏览记录?</div>
      <div class="btn">
        <button class="btnLeft" @click="cancel">取消</button>
        <button class="btnRight" @click="clearallBrowse">确定</button>
      </div>
    </div>
    <div class="baffle" v-if="isShow"></div>
  </div>
</template>
<script>
export default {
  name: "Popup",
  data() {
    return {
      // isShow: false,
    };
  },
  props:["isShow"],

  methods: {
    cancel() {
      this.isShow = false;
    },
    clearallBrowse() {
      this.isShow = false;
    },
  },
};
</script>
<style lang="scss" scoped>
.simulationAlert {
  position: fixed;
  top: 35vh;
  left: 5vw;
  z-index: 1100;
  width: 90vw;
  height: 160px;
  text-align: center;
  font-size: 0;
  background: #ffffff;

  .title {
    margin-top: 15px;
    font-size: 20px;
    color: #333;
  }
  .text {
    margin-top: 20px;
    font-size: 18px;
    color: #999;
  }
  .btn {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1200;
    width: 100%;
    height: 40px;
    border-top: 1px solid #ddd;
  }
  .btn button {
    width: 50%;
    height: 40px;
    line-height: 40px;
    box-sizing: border-box;
    font-size: 16px;
    border: none;
    background-color: #ffffff;
  }
  .btnLeft {
    border-right: 1px solid #ddd !important;
  }
  .btnRight {
    color: #e93b3d;
  }
}
.baffle {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1003;
  width: 100vw;
  height: 100vh;
  background: #000;
  opacity: 0.5;
}
</style>